﻿<Page
    x:Class="Philosophy.Page_of_Type"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Philosophy"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.Resources>
        <CollectionViewSource 
            x:Name="cvsMain2" 
            IsSourceGrouped="true" 
            ItemsPath="Items_Type">
        </CollectionViewSource>
    </Page.Resources>

    <Grid Style="{StaticResource LayoutRootStyle}">
        <Grid.Background>
            <ImageBrush ImageSource="Assets/3.jpg"/>
        </Grid.Background>
        <TextBlock HorizontalAlignment="Left" Height="86" Margin="76,33,0,0" TextWrapping="Wrap" Text="VICTORINA" VerticalAlignment="Top" Width="202" FontSize="36"/>
        <Button x:Name="Back_of_MainPage" Style="{StaticResource PreviousAppBarButtonStyle}" Margin="-7,23,0,673" Width="78" AutomationProperties.Name="" Visibility="Visible" Click="Back_of_MainPage_Click" />
        <GridView 
            x:Name="gvMain_3" 
            HorizontalAlignment="Left"
            Height="585" 
            ItemsSource="{Binding Source={StaticResource cvsMain2}}" 
            Margin="172,86,0,0"
            VerticalAlignment="Top"


            Width="1146" SelectionMode="Single" SelectionChanged="gvMain_2_SelectionChanged" IsSynchronizedWithCurrentItem="False">

            <GridView.ItemTemplate>
                <DataTemplate>
                    <Grid Style="{StaticResource LayoutRootStyle}" HorizontalAlignment="Left" Width="500" Height="500">
                        <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">
                            <Image  Stretch="Fill" Source="Assets/Image.jpg"/>
                        </Border>
                        <StackPanel VerticalAlignment="Bottom" Background="{Binding Color}">
                            <TextBlock Text="{Binding Name_Item}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Margin="15,0,15,8"/>
                        </StackPanel>
                    </Grid>
                </DataTemplate>
            </GridView.ItemTemplate>

            <GridView.GroupStyle>
                <GroupStyle>
                    <GroupStyle.HeaderTemplate>
                        <DataTemplate>
                            <Grid Margin="1,0,0,6">
                                <Button Style="{StaticResource TextPrimaryButtonStyle}" >
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="{Binding Type_Name}" Margin="3,3,10,10" Style="{StaticResource GroupHeaderTextStyle}" FontSize="25" />
                                    </StackPanel>
                                </Button>
                            </Grid>
                        </DataTemplate>
                    </GroupStyle.HeaderTemplate>
                    <GroupStyle.Panel>
                        <ItemsPanelTemplate>
                            <VariableSizedWrapGrid Orientation="Vertical" Margin="0,0,80,0"/>
                        </ItemsPanelTemplate>
                    </GroupStyle.Panel>
                </GroupStyle>
            </GridView.GroupStyle>

            <GridView.ItemsPanel>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel Orientation="Horizontal"/>
                </ItemsPanelTemplate>
            </GridView.ItemsPanel>

        </GridView>
    </Grid>
</Page>